// f8鼠标移动事件
$(".f8>.container>.f8_left>ul>.li_1").mousemove(function(){
	$('.f8>.container>.f8_right>.f8_right_bottom>.tongxueshuo').addClass('cur').siblings().removeClass("cur");
	}	
)
$(".f8>.container>.f8_left>ul>.li_2").mousemove(function(){
	$('.f8>.container>.f8_right>.f8_right_bottom>.ganyan').addClass('cur').siblings().removeClass("cur");
	}	
)
$(".f8>.container>.f8_left>ul>.li_3").mousemove(function(){
	$('.f8>.container>.f8_right>.f8_right_bottom>.shangkebiji').addClass('cur').siblings().removeClass("cur");
	}	
)
$(".f8>.container>.f8_left>ul>.li_4").mousemove(function(){
	$('.f8>.container>.f8_right>.f8_right_bottom>.zuoyepigai').addClass('cur').siblings().removeClass("cur");
	}	
)
//f7鼠标点击事件
$('.f7_bottom>img').click(function(){
	$(this).addClass('f7_cur').siblings().removeClass('f7_cur')
	const big=$(this).attr('data-big');
	$(".f7_top_cur>div>img").prop('src', `img/teacher/${big}.png`)
})

//首页请求数据ajax请求
let url = '/index/course'
	$.get(url, data => {
	 console.log(data);
	const html_one = data.map(value => {
		const {course_title:t,course_image:i,course_hourse:h,course_id:id} = value;
		    return `
				<div>
				<a href="course_detail.html?lid=${id}">
				   	<img src="${i}" >
				   	<div id="">								
				   	<p>${t}</p>
				   	<p>学习周期：${h}小时</p>	
				   	</div>
				</a>
				</div>
		        `;
		     });
		$(".f3_body").append(html_one);
	});

let url1 = '/index/course_1'
	$.get(url1,data=>{
		const html_two = data.map(value => {
			const {course_title:t,course_image:i,course_hourse:h,course_id:id} = value;
			    return `
					<div>
						<a href="course_detail.html?lid=${id}">
							<img src="${i}" >
							<div id="">								
							<p>${t}</p>
							<p>学习周期：${h}}小时</p>	
							</div>
						</a>
					</div>
			        `;
			     });
			$(".f4_body").append(html_two);
		});

